home *** CD-ROM | disk | FTP | other *** search
- <HTML><BODY>
- <%
- ' Method: RenameDir(strOrginalDirectory, strNewDirectory)
- '
- ' Sample Operation:
- ' Rename DirOrg to be DirNew.
- '
- ' This file is provided as part of ASP Power Widgets Samples
- '
- ' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT
- ' WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
- ' INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
- ' OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
- ' PURPOSE.
-
- ' Copyright 1997-1998. All rights reserved.
- ' Dalun Software Inc. ASP Power Widgets
- ' http://www.dalun.com
- ' http://members.tripod.com/ActiveServerPage/
-
-
- sDirOrg = "DirOrg"
- sDirNew = "DirNew"
- sDirOrg = Server.MapPath("/") & "\" & sDirOrg
- sDirNew = Server.MapPath("/") & "\" & sDirNew
-
- response.write "Directory " & chr(34) & sDirOrg & chr(34) & _
- " will be renamed as " & chr(34) & sDirNew & chr(34) & ".<br>"
-
- Set oFDMgt = Server.CreateObject("ASPPW.FDMgt")
- iReturnCode = oFDMgt.RenameDir (sDirOrg, sDirNew)
-
- select case iReturnCode
- case 1: response.write "Operation succeeds.<br>"
- case 0: response.write "Operation failed since "& chr(34) & sDirOrg &chr(34) &" was not found."
- case -1: response.write "Operation failed."
- case else:
- end select
-
- if oFDMgt.GetLastErrNum <> 0 then
- response.write "<br>Error: " & oFDMgt.GetLastErrDescription
- end if
-
- Set oFDMgt = nothing
- %>
- </BODY></HTML>
-
-
-
-
-
-